//传入express的server ，将路径信息分配到controller上
const c=require("../controller/merchant.server.controller");
function fn_merchant(app){//形参无所谓什么名字
	app.route("/merchant/:page")
	.get(c.findAllMerchant) 
	// .post(c.addUser)
	;

	app.route("/merchant/pass/:id")
	// .get(c.loadUser)
	.put(c.passStatus)
	// .delete(c.deleteUser);

	app.route("/merchant/refuse/:id")
	.put(c.refuseStatus)

	app.route("/lowMerchant/:page")
	.get(c.lowMerchant)

	app.route("/blackMerchant/:mId")
	.put(c.blackMerchant)

	app.route("/telList")
	.get(c.showTelList)
	app.route("/merchantTel/:input_tel")
	.get(c.findMerchantByTel)

	app.route("/merchant/get/status")
	.get(c.showMerchantWS)	
	app.route("/merchant/get/status/:id")
	.get(c.showMerchantByIdWS)
	app.route("/merchant/update/:mId/:status")
	.put(c.changeMerchantStatus)
}
module.exports= fn_merchant;